from rest_framework.pagination import LimitOffsetPagination,PageNumberPagination

class CustomPageNumberPagination(PageNumberPagination):

    #1,指定每页有5条数据
    page_size = 5

    #2,方便前端指定每页的数据量
    page_size_query_param = "page_size"

    #3,限制每页的最大数据量
    max_page_size = 20

